<script type="text/javascript">
$(function(){
	var conta="<option value=''>请选择</option>";
	var contb="<option value=''>请选择</option>";
	var contc="<option value=''>请选择</option>";
	$.post("appChargeDef/showBaseInfo",function(json){
		for(var i=0;i<json.cdProDefinitions.length;i++){
			conta+="<option value="+json.cdProDefinitions[i].cardpCode+">"+json.cdProDefinitions[i].cardpName+"</option>"
		}
		for(var i=0;i<json.appClassifications.length;i++){
			contb+="<option value="+json.appClassifications[i].appKindId+">"+json.appClassifications[i].appKindName+"</option>"
		}
		for(var i=0;i<json.appKinds.length;i++){
			contc+="<option value="+json.appKinds[i].appType+">"+json.appKinds[i].appName+"</option>"
		}
		$("select[name='appType']").html(contc);
		$("select[name='appKindId']").html(contb);
		$("select[name='cardpCode']").html(conta);
		 $.post("appChargeDef/showAppFeeList",showAppFeeList,"json")
	},"json")
	
	
});

function updateAppChargeDef(){
	 if($("input[name='appChargeDef']:checked").length < 1){
		 alertMsg.warn("您未选择数据！")
		 return false;
	 }
	 if($("input[name='appChargeDef']:checked").length > 1){
		 alertMsg.warn("选择数据不能大于1条")
		 return false;
	 } 
	 var param;
	 $("input[name='appChargeDef']:checked").each(function(n,item){
		 param=$(this).val();
	 })
	 //alert(param)
	var options={"width":"500","height":"500","param":param};
	$.pdialog.open("appChargeDef/goAddChargeDef","infos", "修改收费定义",options);
}
</script>

<div class="pageHeader ">
	<form id="pagerForm" method="post" action="appChargeDef/showAppFeeList" class="pageForm required-validate" onsubmit="return validateCallback(this,showAppFeeList);">
		<input type="hidden" name="pageNum" value="" /> 
		<input type="hidden" name="numPerPage" value="" />
		<div class="searchBar">
		<div class="row" style="padding: 0 10px;">
		<div class="col-md-4 col-sm-12" >
			<p >
			<label>交易名称：</label>
			<input  name="feeItemName" type="text" size="30" />
		</div>
		<div class="col-md-4 col-sm-12" >
			<p >
			<label>卡产品：</label>
			<select name="cardpCode" ></select>
			</p>
		</div>
		<div class="col-md-4 col-sm-12" >
			<p >
			<label>应用分类：</label>
			<select  name="appKindId" onchange="showAppTypeByAppKindId(this)" class=""></select>
			</p>
		</div>
		</div>
		<div class="row" style="padding: 0 10px;">
		<div class="col-md-4 col-sm-12" >
			<p >
			<label>应用类型：</label>
			<select  name="appType" class=""></select>
		</div>
		<div class="col-md-4 col-sm-12" >
			<p >
			<label>费用类型：</label>
			    <select  name="feeType" class="">
					<option value="">请选择</option>
					<option value="0">本金</option>
					<option value="1">工本费</option>
					<option value="2">交易手续费</option>
					<option value="3">租金</option>
					<option value="4">押金</option>
				</select>
			</p>
		</div>
		</div>
		<div class="subBar">
			<ul> 
				<li>
				<div class="buttonActive" ><div class="buttonContent" ><button type="submit" onclick="return checkByCancelCard()" >查询</button></div></div>
				</li>
			</ul>
		</div>
		</div>
	</form>	
</div>

<form method="post" action="" class="" onsubmit="return validateCallback();">
	<div class="pageContent">
		<div id="ByAppChargeDef">
		<div class="panelBar">
			<ul class="toolBar">
				<li><a class="add" href="appChargeDef/goAddChargeDef" target="dialog" rel="addChargeDef" title="新增收费定义" width="500" height="500"><span>新增</span></a></li>
				<li><a class="edit"  onclick="return updateAppChargeDef();"><span>修改</span></a></li>
			</ul>
		</div>
		<table class="table" width="100%" layoutH="238">
			<thead>
				<tr align="center">
					<!-- <th width="2%"><input name="" onclick="checkAllCss(this)" type="checkbox" group="appChargeDef" class="checkboxCtrl"></th> -->
					<th width="3%">选择</th>
					<th width="14%" >交易名称</th>
					<th width="10%" >卡产品</th>
					<th width="10%" >应用分类</th>
					<th width="14%" >应用类型</th>
					<th width="7%" >费用类型</th>
					<th width="7%" >收费金额</th>
					<th width="15%">有效期(起)</th>
					<th width="15%">有效期(止)</th>
					<th width="5%">是否有效</th>
				</tr>
			</thead>
			<tbody id="tbodyByChargeDef">
				
			</tbody>
		</table>
		<!-- <div class="panelBar">
			<div class="pages">
				<span>显示</span>
					<select id="numPerPageByChargeDef" name="numPerPage" onchange="paging(this,$('#showAppFeeList'),showAppFeeList)">
						<option value="20">20</option>
						<option value="30">30</option>
						<option value="50">50</option>
						<option value="100">100</option>
					</select>
				<span id="totalCountByChargeDef" ></span>
			</div>
				<div id="paginationByChargeDef" class="pagination1"  ></div>
		</div> -->
		</div>
		<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value},'tbodyByChargeDef',showAppFeeList)">
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
				<option value="200">200</option>
			</select>
			<span id="totalCountByChargeDef">条，共${totalCount}条</span>
		</div>
		<div callback='showAppFeeList' id="paginationByChargeDef" rel="tbodyByChargeDef" class="pagination" targetType="navTab" totalCount="200" numPerPage="5" pageNumShown="5" currentPage="1"></div>
	</div>

</div>
</form>
	

